package com.tender.exceptions;

import lombok.Data;
import com.tender.enums.ErrorTypeEnum;

@Data
public class ShiroException extends RuntimeException {

    private String code;

    public ShiroException(String message, String code) {
        super(message);
        this.code = code;
    }

    public ShiroException(ErrorTypeEnum errorTypeEnum) {
        super(errorTypeEnum.getErrorMsgCn());
        this.code = errorTypeEnum.getErrorCode();
    }

}
